import request from '@/request/request'

// 创建采购退货单
export function createPurchaseReturn(returnData) {
    return request({
        method: "post",
        url: '/purchase/return',
        data: returnData
    })
}

// 分页查询采购退货单
export function getPurchaseReturnPage(pageParams) {
    return request({
        method: "post",
        url: '/purchase/return/page',
        data: pageParams
    })
}

// 获取采购退货单详情
export function getPurchaseReturnWithDetails(id) {
    return request({
        method: "get",
        url: `/purchase/return/withDetails/${id}`,
    })
}

// 更新采购退货单
export function updatePurchaseReturn(returnData) {
    return request({
        method: "put",
        url: '/purchase/return',
        data: returnData
    })
}

// 删除采购退货单
export function deletePurchaseReturn(id) {
    return request({
        method: "delete",
        url: `/purchase/return/${id}`,
    })
}